#!/bin/bash


local_dir="/root/voltage_control"

# 文件MD5检查

if [ ! -d /root/voltage_control ];then
    mkdir /root/oltage_control/
    cp ./* /root/voltage_control
fi

cd $(local_dir)

cp voltage_control.service /usr/lib/systemd/system/
systemctl daemon-reload
systemctl enable voltage_control.service
systemctl start voltage_control.service

sed -i '$i\sh /root/voltage_control/start.sh &'  /etc/rc.local




